home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / genial / include / trace.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  2.5 KB  |  78 lines

  1. /*
  2.  * trace.h -- include file for traces and trace contexts
  3.  *
  4.  */
  5.  
  6. #include "trace_ui.h"
  7.  
  8. /* data structures for trace integration: */
  9.  
  10. #define NINT 10            /* max number of integrations for a trace */
  11.  
  12. #define STARTY 10
  13.  
  14. struct integ_value {
  15.     int       min, max;        /* min and max values from trace */
  16.     int       isize;        /* number of points in ival */
  17.     int      *ival;        /* array of integration values */
  18. };
  19.  
  20. struct integ_context {
  21.     struct integ_value ireg[NINT];
  22.     int       cnum;        /* # of current integration (0-NINT) */
  23.     Xv_window ipntw, iwin, icanv;    /* handles for integral display */
  24.     XID       ixid;        /* XID of above */
  25.     struct graph_lab *yglab;
  26.     struct cbstore *cbl;    /* backing store of the left cross  */
  27.     struct cbstore *cbr;    /* backing store of the right cross */
  28. };
  29.  
  30. struct tropts {            /* structure containing modifiable trace
  31.                  * options */
  32.     int       avgrad;        /* radius to be used for averaging in order
  33.                  * to make smooth traces. */
  34.     int       scale_type;    /* type of scaling to do */
  35.     int       axmin, axmax;    /* min and max values to be used in creating
  36.                  * the scaled axis labels */
  37.     /*
  38.      * we may wish to create an array of (XPoint, string) doubles which
  39.      * contains the appropriate information necessary to refresh the display
  40.      * of each trace window QUICKLY
  41.      */
  42.     /*
  43.      * may also wish to have some integer indicating # of labels and allow
  44.      * this to be modified.
  45.      */
  46. };
  47.  
  48. struct trcontext {
  49.     trace_trwin_objects *win_info;
  50.     Xv_window trpntw;        /* XView window handles for a trace win */
  51.     XID       trxid;        /* XID of above */
  52.     struct pval *pbuf;        /* point buffer */
  53.     int       npts;        /* number of indices into above */
  54.     int       x, y;        /* coordinate pair of last mouse event */
  55.     int       flags;        /* a mask of flags */
  56.     struct cbstore *cb;        /* backing store of the cross in the original
  57.                  * window */
  58.     struct tropts t_attr;    /* localized, modifiable trace attributes */
  59.     struct graph_lab *yglab;    /* graph labels along y axis */
  60.     struct integ_context integ;    /* used for integration */
  61. };
  62.  
  63. #define SMPHT .056        /* the amount of the display determined to be
  64.                  * reasonable for the display of a sample bar
  65.                  * of what the grey values really look like.
  66.                  * On a 270 pixel high display(the default),
  67.                  * this is 15 pixels. */
  68.  
  69. /* to be used with the flags member of a trcontext: */
  70. #define RECT 0x01        /* trace is rectangular */
  71.  
  72.  
  73. extern struct trcontext *ctx_by_lid();
  74.  
  75. extern unsigned trace_value();
  76.  
  77. void      trcanv_repaint_proc();
  78.